Graph-based data models for partitioned data

ABSTRACT

A method and system for managing access to data. A plurality of data items is stored across a plurality of partitions according to a graph-based data model. The data model associates each data item with an identifier of a source entity pertaining to the data item, an identifier of a destination entity pertaining to the data item, and an identifier of a type of directed relationship pertaining to the data item from the source entity to the destination entity. When a lookup request is received identifying a source entity and a type of directed relationship from the source entity, a particular partition is identified based on the source entity identifier. A response to the lookup request is then returned that includes data item(s) from the identified partition that are associated in the partition with both the identified source entity identifier and the identified directed relationship type.

CROSS-REFERENCE TO RELATED APPLICATIONS; BENEFIT CLAIM

This application claims the benefit as a divisional of application Ser.No. 15/419,364, filed Jan. 30, 2017, which is a continuation ofapplication Ser. No. 14/025,657, filed Sep. 12, 2013, now U.S. Pat. No.9,576,071 issued Feb. 21, 2017, the entire contents of each of which ishereby incorporated by reference as if fully set forth herein. Theapplicant(s) hereby rescind any disclaimer of claim scope in the parentapplication(s) or the prosecution history thereof and advise the USPTOthat the claims in this application may be broader than any claim in theparent application(s).

TECHNICAL FIELD

The disclosed embodiments relate to data models. More specifically, thedisclosed embodiments relate to graph-based data models for partitioneddata.

BACKGROUND

Content on electronic devices is commonly synchronized, stored, shared,and/or backed up on online content management systems such as filehosting services, cloud storage services, and/or remote backup services.For example, images, audio, video, documents, executables, and/or othertypes of content may be stored on a network-enabled electronic devicesuch as a personal computer, laptop computer, portable media player,tablet computer, and/or mobile phone. A user of the electronic devicemay also have a user account with a cloud storage service that allowscopies of the content to be stored and/or backed up with the cloudstorage service. The cloud storage service may further transmit thecopies to other electronic devices of the user and/or other users whoare authorized to access the files, thus synchronizing the contentbetween the cloud storage service and electronic devices.

In addition, the widespread creation, transmission, sharing, and/or useof content through an online content management system may require thepartitioning of a data model of the content, users, and/or otherentities associated with the online content management system acrossmultiple computer systems and/or storage mechanisms. For example, datafor multiple users, content items, groups of users, and/or collectionsof content items in the online content management system may be trackedand/or accessed using a data model that is stored in a relationaldatabase. As use of the online content management system increases, thedata model may outgrow the storage capacity of the computer systemhosting the relational database and require partitioning among multiplecomputer systems and/or database instances.

Unfortunately, partitioning of conventional relational databases may bedifficult and/or inefficient. For example, partitioning of a StructuredQuery Language (SQL) database may require manual rewriting of code forthe SQL database, which may be tedious and/or cumbersome. On the otherhand, structured storage mechanisms that are easily partitioned may notmeet requirements for concurrent access to online content managementsystems. For example, a NoSQL database that is optimized for scalabilityand availability may not support the atomicity, consistency, isolation,and durability (ACID) guarantees provided by relational databases.Consequently, access to data in online content management systems may befacilitated by mechanisms for improving the scalability, reliability,and integrity of data models of the data.

SUMMARY

The disclosed embodiments provide a system that manages access to data.During operation, the system provides a graph-based data model of thedata, wherein the graph-based model comprises a set of nodes and a setof directed edges among the nodes. Next, the system stores thegraph-based data model in a set of partitions, wherein each partitionfrom the set of partitions includes one or more nodes from the set ofnodes and all outgoing edges from the one or more nodes. Finally, thesystem enables lookup of a set of outgoing edges associated with asource node from the one or more nodes.

In some embodiments, the system also updates the graph-based data modelusing a set of transactions.

In some embodiments, updating the graph-based data model using the setof transactions involves enabling locking of a node from the set ofnodes and one or more outgoing edges associated with the node during atransaction associated with the node and an edge type of the one or moreoutgoing edges, and enabling unlocking of the node and the one or moreoutgoing edges after the transaction is complete.

In some embodiments, updating the graph-based data model using the setof transactions further involves enabling rollback of the graph-baseddata model to a previous state of the node and the one or more outgoingedges.

In some embodiments, enabling lookup of the set of outgoing edgesassociated with a source node from the one or more nodes involvesidentifying the partition comprising the source node, and searching theoutgoing edges by an identifier associated with the source node.

In some embodiments, enabling lookup of the set of outgoing edgesassociated with a source node from the one or more nodes furtherinvolves filtering the outgoing edges by an attribute associated withthe outgoing edges.

In some embodiments, enabling lookup of the set of outgoing edgesassociated with a source node from the one or more nodes furtherinvolves obtaining one or more destination nodes associated with theoutgoing edges, and searching a set of additional outgoing edgesassociated with the one or more destination nodes.

In some embodiments, each node from the set of nodes is associated withat least one of a user, a collection, an item, a notification, a group,and a namespace.

In some embodiments, the set of directed edges includes a first directededge from a first node to a second node and a second directed edge fromthe second node to the first node.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 shows a schematic of a system in accordance with the disclosedembodiments.

FIG. 2 shows a system for managing access to data in accordance with thedisclosed embodiments.

FIG. 3A shows an exemplary graph-based data model in accordance with thedisclosed embodiments.

FIG. 3B shows an exemplary graph-based data model in accordance with thedisclosed embodiments.

FIG. 3C shows an exemplary graph-based data model in accordance with thedisclosed embodiments.

FIG. 4 shows a flowchart illustrating the process of managing access todata in accordance with the disclosed embodiments.

FIG. 5 shows a computer system in accordance with the disclosedembodiments.

In the figures, like reference numerals refer to the same figureelements.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled inthe art to make and use the embodiments, and is provided in the contextof a particular application and its requirements. Various modificationsto the disclosed embodiments will be readily apparent to those skilledin the art, and the general principles defined herein may be applied toother embodiments and applications without departing from the spirit andscope of the present disclosure. Thus, the present invention is notlimited to the embodiments shown, but is to be accorded the widest scopeconsistent with the principles and features disclosed herein.

The data structures and code described in this detailed description aretypically stored on a computer-readable storage medium, which may be anydevice or medium that can store code and/or data for use by a computersystem. The computer-readable storage medium includes, but is notlimited to, volatile memory, non-volatile memory, magnetic and opticalstorage devices such as disk drives, magnetic tape, CDs (compact discs),DVDs (digital versatile discs or digital video discs), or other mediacapable of storing code and/or data now known or later developed.

The methods and processes described in the detailed description sectioncan be embodied as code and/or data, which can be stored in acomputer-readable storage medium as described above. When a computersystem reads and executes the code and/or data stored on thecomputer-readable storage medium, the computer system performs themethods and processes embodied as data structures and code and storedwithin the computer-readable storage medium.

Furthermore, methods and processes described herein can be included inhardware modules or apparatus. These modules or apparatus may include,but are not limited to, an application-specific integrated circuit(ASIC) chip, a field-programmable gate array (FPGA), a dedicated orshared processor that executes a particular software module or a pieceof code at a particular time, and/or other programmable-logic devicesnow known or later developed. When the hardware modules or apparatus areactivated, they perform the methods and processes included within them.

The disclosed embodiments provide a method and system for managingaccess to data. The data may represent users, groups of users, contentitems, collections of content items, notifications, relationships,and/or other types of associative data. As a result, the data may bestored in a graph-based data model that contains a set of nodes and aset of directed edges among the nodes.

More specifically, the disclosed embodiments provide a method and systemfor partitioning the graph-based data model and using transactions toupdate the graph-based data model. Each partition of the graph-baseddata model may include one or more nodes and all outgoing edges from thenode(s). As a result, lookups associated with a node may be performedwith only one partition instead of across multiple partitions. Moreover,the node and one or more outgoing edges from the node may be lockedduring a transaction associated with the node and an edge type of theoutgoing edge(s) to facilitate reliable concurrent access to thegraph-based data model. The node and outgoing edge(s) may then beunlocked after the transaction is complete to allow subsequentmodifications to the node and/or outgoing edge(s). Along the same lines,rollback of the graph-based data model to a previous state of the nodeand the one or more outgoing edges may be enabled to maintain atomicityand/or support features associated with accessing and/or modifying thedata.

Also, some embodiments of the system support automatic caching forqueries in a manner that is consistent with the underlying database.This means the cache never has any stale data, and if data is read fromcache it is equivalent to reading to the data from the underlyingdatabase. During operation of the cache, queries are automaticallycached during reads when a cache miss happens, and the cache isautomatically invalidated during writes. Note that during a write thesystem can be configured to invalidate only a small subset of the cachedqueries that the write could potentially change. This means the systemdoes not have to clear the entire cache on every write.

FIG. 1 shows a schematic of a system in accordance with the disclosedembodiments. As shown in FIG. 1, the system corresponds to a contentmanagement environment 105, which includes a set of client devices 110Aand 110B (collectively 110) and an online content management system 120interconnected by one or more networks 118. Networks 118 may include alocal area network (LAN), wide area network (WAN), personal area network(PAN), virtual private network, intranet, cellular network, WiFinetwork, Bluetooth (Bluetooth™ is a registered trademark of BluetoothSIG, Inc.) network, universal serial bus (USB) network, and/or Ethernetnetwork. Various aspects of client devices 110 and online contentmanagement system 120 are discussed below.

Each client device 110 may selectively execute a content managementclient application 112A and 112B (collectively 112) (also referred to asa “content management client”) that may be used to access content itemsstored within online content management system 120. While only twoclient devices 110A and 110B are shown in FIG. 1 for purposes ofclarity, those skilled in the art will appreciate that many clientdevices 110 may simultaneously connect through network(s) 118 to onlinecontent management system 120 at any given time. Examples of suitableclient devices 110 include, but are not limited to, personal computers;mobile computing devices, such as laptop computers and/or tabletcomputers; handheld devices, such as a smartphone (e.g., an IPHONE®,BLACKBERRY®, or ANDROID™-based smartphone), personal digital assistant,and/or portable media player; digital media receivers; and/or othernetwork-enabled electronic devices.

In one or more embodiments, content management client application 112supports automatic synchronization between client devices 110 and onlinecontent management system 120. For example, content management clientapplication 112 may automatically synchronize changes associated with adesignated directory (e.g., new, deleted, modified, copied, and/or movedfiles and/or subdirectories within the directory) between each clientdevice 110 and online content management system 120. To perform suchsynchronization, content management client application 112 may monitor alocal directory corresponding to the designated directory on clientdevices 110 and synchronize changes to the local directory with a remotedirectory corresponding to the designated directory on online contentmanagement system 120. Conversely, content management client application112 may identify changes to the remote directory and propagate thechanges to the local directory.

Synchronized copies of a content item 114A, 114B and 114C may thus bemaintained on client devices 110A and 110B and within online contentmanagement system 120, respectively. Alternatively, client devices 110may provide a file-browser type interface (not shown) for directlymanipulating the content items stored on online content managementsystem 120 without maintaining a local copy. Client devices 110 may alsoinclude applications 116A and 116B (collectively 116) that manipulatecopies of content items 114A and 114B. For example, applications 116 maybe used to create, modify, process, and/or otherwise use documents,images, video, audio, and/or other content items (e.g., content items114) on client devices 110.

Each client device 110 may store a local, synchronized copy of a contentitem from online content management system 120 in any suitable format.When content management client application 112 presents content itemsthat are stored within online content management system 120 to a user,the content items may be arranged in directories, which may be arrangedin other directories, or in any other arbitrary arrangement and/ordirectory structure supported by online content management system 120and/or determined by the user. Consequently, each user's content itemstorage architecture may be considerably different from the next, and insome instances, the content item storage architecture may be implementedto maximize storage and content item retrieval efficiency.

Online content management system 120 stores content items and managesaccess to those content items via client devices 110. Online contentmanagement system 120 and its components may be implemented using anyappropriate hardware and software that supports file serving, storage,and retrieval functions. For example, online content management system120 may be implemented using one or more servers, cloud storage,network-attached storage (NAS), a storage area network (SAN), aredundant array of inexpensive disks (RAID) system, and/or othernetwork-accessible storage. Online content management system 120 mayadditionally store the content items using a variety of filesystemarchitectures and/or hierarchies and obscure the locations and/ormechanisms involved in storing the data from client devices 110.

As shown in FIG. 1, online content management system 120 includes aninterface module 122, an account module 124, a content-item-updatingmodule 126, and a data store 128. The components of online contentmanagement system 120 are discussed below.

Interface module 122 may facilitate content item access and content itemstorage operations among online content management system 120 and clientdevices 110. Interface module 122 may receive content items from andsend content items to client devices 110 consistent with each user'spreferences for sharing content items. Interface module 122 may also actas the counterpart to a client-side file-explorer style user interfacethat allows a user to manipulate content items directly stored on onlinecontent management system 120.

In one or more embodiments, software on client devices 110 may integratenetwork-stored content items with the client's local filesystem toenable the user to manipulate network-stored content items through thesame user interface (UI) used to manipulate content items on the localfilesystem, such as through a file explorer, file finder, file chooser,and/or browser application. As an alternative or supplement to theclient-side file-explorer interface, interface module 122 may provide aweb interface for client devices 110 to access (e.g., via applications116) and allow the user to manipulate content items stored within onlinecontent management system 120. In this way, the user can directlymanipulate content items stored within online content management system120.

Data store 128 may store content items such as those uploaded usingclient devices 110 and/or other suitable electronic devices. In theembodiment illustrated in FIG. 1, client device 110A, which isassociated with a first user, is shown as locally storing at least onecontent item 114A, and client device 110B, which is associated with asecond user, is shown as locally storing at least one content item 114B.A copy of the locally stored content item 114C may also be maintained indata store 128 of online content management system 120. Consequently,content items 114A, 114B and 114C may be local versions of the sameshared document that reside on client device 110A, client device 110Band online content management system 120, respectively. Note that clientdevices 110A and 110B may also store other content items that arereplicated on online content management system 120, but are not sharedwith other client devices.

Data store 128 may maintain information identifying the user,information describing the user's file directory, and/or otherinformation in a file journal that is maintained for each user. The filejournal may be maintained on online content management system 120 and/oras a “server-side file journal” on both online content management system120 and locally on each client device 110. The file journal may be usedto synchronize various copies of a particular content item that areassociated with a user's account.

As a particular example, in the embodiment shown in FIG. 1, the systemmay be configured so that any changes that are made to content item 114Aon particular client device 110A may also be automatically reflected inthe copy of content item 114C stored within online content managementsystem 120 and the copy of the content item 114B on client device 110B.Similarly, any changes that are made to content item 114C on onlinecontent management system 120 may also be automatically reflected in thecopy of content item 114A stored on client device 110A, and the copy ofcontent item 114B stored on client device 110B.

Moreover, content items 114A and 114B may be stored in local cacheswithin content management clients 112A and 112B, respectively.Alternatively, content items 114A and 114B may be stored in localfilesystems within content management clients 112A and 112B. In somesituations, content items 114A and 114B are stored in filesystem spacethat is reserved for content management clients 112A and 112B. In othersituations, content items 114A and 114B are stored in normal filesystemspace that is not reserved for content management clients 112A and 112B.

Account module 124 may track content items stored in data store 128 andentries in the server-side file journal for each content item. As usersgrant content-item-access permissions to other users, account module 124may update the server-side file journal associated with each relevantuser in data store 128. Account module 124 may also track client devices110 that are associated with each user's account. For example, a usermay want to share all content items among his/her desktop computer,tablet computer, and mobile device. To make such a sharing arrangementseamless to the user, the user's single account on online contentmanagement system 120 may be associated with each of the user'srespective client devices. An application running on each respectiveclient device 110 may help to coordinate synchronization of contentitems on the client device with corresponding versions of the contentitems within the user's account in online content management system 120and/or on the user's various other client devices.

Content-item-updating module 126 may maintain consistency amongdifferent copies (versions) of a content item 114A, 114B and 114C thatare located in client device 110A, client device 110B and online contentmanagement system 120, respectively. This can be complicated, becausethe different versions 114A, 114B and 114C of the same shared contentitems may be simultaneously changed at client devices 110A-B and onlinecontent management system 120. Hence, online content management system120 may enforce an updating policy to resolve conflicting updates todifferent versions of the same content item. For example, the copy ofcontent item 114C on online content management system 120 may bedesignated as the master copy, and updates to copies 114A and 114B ofthe content item may be serialized and applied one-at-a-time to themaster copy 114C before being propagated back to copies 114A and 114Blocated on client devices 110A and 110B, respectively.

Data store 128 and/or another data store in online content managementsystem 120 may also store data describing content items, users, groupsof users and/or content items, and/or other objects related to thestructure and/or use of online content management system 120. Forexample, the data may describe objects and/or entities associated withonline content management system 120, as well as associations and/orrelationships among the objects and/or entities.

As shown in FIG. 2, the data may be stored in a graph-based data model204 by online content management system 120. In other words, theobjects, entities, associations, and/or relationships may be stored as aset of nodes representing the objects and/or entities and a set ofdirected edges among the nodes representing the associations and/orrelationships.

The nodes and/or directed edges may also contain attributes that storeinformation about the corresponding objects, entities, associations,and/or relationships. For example, a node representing a collection ofcontent items in online content management system 120 may includeattributes such as a unique identifier for the collection, a name of thecollection, a description of the collection, a number of content itemsin the collection, a modification timestamp, and/or a creationtimestamp. On the other hand, a node representing a user of onlinecontent management system 120 may include attributes such as a name,email address, password, user type and/or role, storage quota, and/orunique identifier for the user. Finally, a directed edge from the userto the collection may include unique identifiers for the user andcollection, as well as a set of permissions and/or a path to thecollection for the user.

In addition, graph-based data model 204 may be divided among a set ofpartitions 210-212, with access to and update of graph-based data model204 and/or partitions 210-212 mediated by a modeling apparatus 202 inonline content management system 120. Partitions 210-212 may facilitatescaling of graph-based data model 204 as the use of online contentmanagement system 120 increases. For example, each partition 210-212 mayreside on a separate physical machine. To improve the reliability and/oravailability of graph-based data model 204, the partition may also beduplicated in one or more additional physical machines that operate asslaves to a “master” partition and are capable of taking over as the“master” partition in the event of fault and/or failure in the current“master” partition. As the amount of data in a partition reaches thestorage capacity of the corresponding machine(s), one or more newmachines may be added, and a new partition may be created on the newmachine(s) to accommodate additional data in graph-based data model 204.

As mentioned above, users typically interact with online contentmanagement system 120 through an application 214 on an electronic device200, such as content management client applications 112 and/orapplications 116 executing on client devices 110 of FIG. 1. Tofacilitate these user interactions, application 214 may include aninterface module 206 that provides a user interface to a user ofelectronic device 200 and communicates with interface module 122 ofonline content management system 120. For example, interface module 206may provide a file explorer, file finder, file chooser, and/or browserapplication that allows the user to access and/or update data in onlinecontent management system 120. In other words, interface modules 122 and206 may provide an interface with modeling apparatus 202 and enablelookup of data in graph-based data model 204.

More specifically, application 214 may verify that the user is loggedinto online content management system 120. If the user is not loggedinto online content management system 120, application 214 may provide adialog box and/or one or more other user-interface elements throughinterface module 206 that allow the user to provide authenticationcredentials (e.g., username and password) for a user account and/orcreate a user account with online content management system 120.

Once the user is authenticated with online content management system120, application 214 may enable access to the user's content items withonline content management system 120 through interface module 206. Forexample, application 214 may allow the user to navigate a hierarchicaldirectory structure containing directories, sub-directories, files,and/or other content items associated with the user account throughinterface module 206. Application 214 may also display content itemsand/or other data associated with the user based on the user's groups,collections of content items, and/or other associations in graph-baseddata model 204. Application 214 may also copy a portion of data relatedto the user, the user's associations, and/or the user's content items toa cache 208 on electronic device 200 for subsequent use and/or retrievalby the user.

Those skilled in the art will appreciate that conventional storagemechanisms for graph-based data model 204 may be associated with atradeoff between scalability and ease of partitioning and atomicity,consistency, isolation, and durability (ACID). In particular, the use ofa relational database, such as a Structured Query Language (SQL)database, to store graph-based data model 204 may enable the use oftransactions and guarantee ACID properties while requiring manualrewriting of code for graph-based data model 204 to partitiongraph-based data model 204. On the other hand, the use of a graphdatabase, such as a NoSQL database, to store graph-based data model 204may enable automatic partitioning of graph-based data model 204 but maynot support transactions that enforce ACID properties in graph-baseddata model 204.

In one or more embodiments, online content management system 120includes functionality to store and/or manage graph-based data model 204in a way that facilitates partitioning and scaling of graph-based datamodel 204 and enables the use of transactions in updating graph-baseddata model 204. First, a modeling apparatus 202 in online contentmanagement system 120 may store graph-based data model 204 in partitions210-212 so that each partition contains one or more nodes in graph-baseddata model 204 and all outgoing edges from the node(s). Suchpartitioning of graph-based data model 204 may expedite both lookup ofdata in graph-based data model 204 and subsequent partitioning ofgraph-based data model 204 (e.g., as the amount of data in graph-baseddata model 204 grows).

As mentioned above, interface modules 122 and 206 may provide aninterface that enables lookup of a set of outgoing edges associated witha source node from graph-based data model 204. For example, theinterface may allow the user to access groups, contacts, collections ofcontent items, individual content items, and/or other data associatedwith the user in graph-based data model 204.

To perform lookup of graph-based data model 204, the interface mayobtain an identifier for a source node from the set of nodes ingraph-based data model 204, identify the partition (e.g., partitions210-212) containing the source node, and search the outgoing edges bythe identifier. For example, the interface may obtain an identifier fora node representing a collection of content items (e.g., after the userselects a graphical element representing the collection within interfacemodule 206) and locate the partition containing the node. The interfacemay then search outgoing edges from the node to identify the set ofcontent items in the collection and/or provide the content items to theuser. Because the outgoing edges are stored on the same partition as thenode, the lookup may be performed with only the partition and requireless time than a lookup that is conducted across multiple partitionsand/or machines.

The interface may also enable filtering of the outgoing edges by anattribute associated with the outgoing edges. For example, the interfacemay match attributes of the outgoing edges to prefixes, strings, rangesof values, regular expressions, and/or other types of data.Consequently, the interface may allow the user to identify a specificassociation and/or type of association in graph-based data model 204.

The interface may additionally enable subsequent lookup of other nodesand/or directed edges associated with the source node. First, theinterface may obtain one or more destination nodes associated with(e.g., connected to) the outgoing edges of the source node and search aset of additional outgoing edges associated with the destinationnode(s). The interface may repeat the process until nodes and/or edgesof a certain length from the source node have been searched. Forexample, a lookup of all users in a group that begins with a node for auser in the group may first identify the group using a directed edgefrom the user to the group, then identify the other users in the groupusing directed edges from the group to the other users.

As mentioned above, modeling apparatus 202 and/or the interface mayupdate graph-based data model 204 using a set of transactions, thusenforcing ACID properties in graph-based data model 204. In particular,modeling apparatus 202 and/or the interface may enable locking of a nodeand one or more outgoing edges from the node during a transactionassociated with the node and an edge type of the outgoing edge(s). Forexample, a transaction that adds an association between a collection anda user may lock the user's node and outgoing edges from the user's nodeto collections while an outgoing edge from the user to the collection iscreated and the number of collections associated with the user isupdated. While the node and outgoing edges are locked, changes (e.g.,additions, deletions, modifications, etc.) associated with the node andoutgoing edges by other operations may be disabled. Modeling apparatus202 and/or the interface may then enable unlocking of the node and theoutgoing edge(s) after the transaction is complete to enable subsequentoperations associated with the node and/or outgoing edge(s).

Furthermore, modeling apparatus 202 and/or the interface may enablerollback of graph-based data model 204 to a previous state of the nodeand the outgoing edge(s) by tracking previous versions of graph-baseddata model 204. For example, modeling apparatus 202 may track differentversions of graph-based data model 204 over time in “snapshots” and/orlog tables of changes to graph-based data model 204. If a rollback isinitiated because of a transaction failure and/or the undoing of achange to graph-based data model 204 by a user and/or online contentmanagement system 120, modeling apparatus 202 may use the trackedversions to revert graph-based data model 204 to the version associatedwith the rollback.

By storing data in nodes and directed edges of graph-based data model204, the system of FIG. 2 may enable automatic partitioning of the dataand facilitate scaling of graph-based data model 204. Moreover, thecollocation of all outgoing edges from a node in the same partition asthe node may improve the performance of queries and/or lookups ofgraph-based data model 204 over queries and/or lookups that are morecomplex and/or run across multiple machines and/or partitions. At thesame time, the use of transactions to update graph-based data model 204may allow ACID properties to be enforced, thereby improving thereliability and/or integrity of graph-based data model 204.

Those skilled in the art will appreciate that the system of FIG. 2 maybe implemented in a variety of ways. As mentioned above, each partition210-212 of graph-based data model 204 may be stored as a “master”partition and/or one or more “slave” partitions. In addition, the“master” and “slave” partitions may reside in relational databases, flatfile storage, and/or other mechanisms for storing structured data.

Moreover, the functionality of interface module 122 and/or modelingapparatus 202 may be provided by a single physical machine, multiplecomputer systems, a grid, and/or a cloud computing system. For example,one or more web and/or client servers implementing interface module 122may communicate with one or more instances of modeling apparatus 202 toaccess data in graph-based data model 204.

Finally, modeling apparatus 202, interface modules 122 and/or 206, andgraph-based data model 204 may be used to store and/or enable access toany type of associative data. For example, graph-based data model 204may include data that represents the hierarchy of an organization, asocial network, and/or other types of taxonomies and/or networkstructures. In turn, modeling apparatus 202 and interface modules 122and/or 206 may facilitate use of graph-based data model 204 with avariety of applications (e.g., application 214) associated withaccessing and/or using data in graph-based data model 204.

FIG. 3A shows an exemplary graph-based data model (e.g., graph-baseddata model 204 of FIG. 2) in accordance with the disclosed embodiments.As shown in FIG. 3A, the graph-based data model includes nodesrepresenting a set of users 302-304, a set of collections 306-310, and aset of items 312-318.

The graph-based data model also includes a set of directed edges amongthe nodes, which represent associations and/or relationships betweenpairs of objects and/or entities corresponding to the nodes. Forexample, user 302 may have outgoing edges to collections 306-308, anduser 304 may have outgoing edges to collections 308-310. At the sametime, collections 306-308 may have outgoing edges to user 302, andcollections 308-310 may have outgoing edges to user 304. Similarly,collection 306 may have an outgoing edge to item 312, collection 308 mayhave outgoing edges to items 312-314, and collection 310 may haveoutgoing edges to items 314-318. In turn, item 312 may have outgoingedges to collections 306-308, item 314 may have outgoing edges tocollections 308-310, and items 316-318 may each have an outgoing edge tocollection 310.

The use of bidirectional edges in connecting users 302-304, collections306-310, and items 312-3318 may allow lookups to occur from either nodein an association, thus facilitating searching of the graph-based datamodel. For example, an association between user 304 and collection 308may be identified by looking up outgoing edges from either user 304 orcollection 308.

The graph-based data model may be used with an online content managementsystem (e.g., online content management system 120 of FIG. 1) and/orother application associated with users 302-304, collections 306-310,and items 312-318. For example, directed edges among items 312-318(e.g., content items) and collections 306-310 may depict the inclusionof items 312-318 in collections 306-310, while directed edges amongcollections 306-310 and users 302-304 may indicate the users' ability toaccess collections 306-310 and, in turn, items 312-318 in collections306-310.

FIG. 3B shows an exemplary graph-based data model in accordance with thedisclosed embodiments. As with the graph-based data model of FIG. 3A,the graph-based data model of FIG. 3B includes a set of nodes and a setof directed edges among the nodes. Unlike the graph-based model of FIG.3A, the graph-based model of FIG. 3B includes nodes representing a user320 and a set of notifications 322-326 and three outgoing (e.g.,unidirectional) edges from user 320 to notifications 322-326.

As shown in FIG. 3B, the edges represent revisions 328-332 associatedwith user 320. For example, revisions 328-332 may be made to a sharedfolder of an online content management system (e.g., online contentmanagement system 120 of FIG. 1) by user 320. In addition, each revision328-332 may trigger the generation of a corresponding notification322-326 of the revision to other users with access to the shared folder.If another user has previously received notifications 322-324 throughthe online content management system, only notification 326 may beprovided to the other user the next time the other user accesses theonline content management system. On the other hand, if the other userhas not received any notifications 322-326, all three notifications322-326 may be provided to the other user the next time the other useraccesses the online content management system.

FIG. 3C shows an exemplary graph-based data model in accordance with thedisclosed embodiments. The graph-based data model includes nodesrepresenting a set of users 334-336, a set of groups 340-342, and a setof namespaces 344-350. Like the graph-based data model of FIG. 3A, thegraph-based data model of FIG. 3C includes a set of bidirectional edgesconnecting the nodes.

The graph-based data model of FIG. 3C may also be used with an onlinecontent management system, such as online content management system 120of FIG. 1. In particular, groups 340-342 may represent groups of users(e.g., users 334-336) in the online content management system, withbidirectional edges between a user and a group indicating membership ofthe user in the group. For example, users 334-336 may both belong togroup 340, while only user 336 may belong to group 342.

In addition, namespaces 344-346 may represent a set of content items,folders, data, and/or other resources associated with a user or group.In addition, access to the resources in a namespace may be representedby a bidirectional edge between the namespace and the user or group. Forexample, bidirectional edges in the graph-based data model may indicatethat namespace 344 represents the resources of user 334, namespace 346represents the resources of user 336, namespace 348 represents theresources of group 340, and namespace 350 represents the resources ofgroup 342.

On the other hand, membership of a user in a group may not automaticallygrant the user access to the group's namespace. For example, abidirectional edge between user 334 and namespace 348 may indicate thatuser 334 has access to a shared folder of group 340, to which user 334belongs. In addition, the edge may include an attribute describing thetype of access (e.g., read, write, etc.) granted to user 334 inaccessing namespace 348. On the other hand, a bidirectional edge doesnot exist between user 336 and namespace 350, indicating that user 336is not granted access to a shared folder of group 342 despite themembership of user 336 in group 342.

FIG. 4 shows a flowchart illustrating the process of managing access todata in accordance with the disclosed embodiments. In one or moreembodiments, one or more of the steps may be omitted, repeated, and/orperformed in a different order. Accordingly, the specific arrangement ofsteps shown in FIG. 4 should not be construed as limiting the scope ofthe technique.

Initially, a graph-based data model of the data is provided (operation402). The graph-based model may include a set of nodes and a set ofdirected edges among the nodes. To facilitate searching of thegraph-based data model, the directed edges may include a first directededge from a first node to a second node and a second directed edge fromthe second node to the first node. The graph-based model may thusrepresent a set of entities and/or objects, as well as a set ofassociations and/or relationships among the entities and/or objects. Forexample, the nodes may represent users, collections, items,notifications, groups, and/or namespaces. Next, the graph-based model isstored in a set of partitions (operation 404). Each partition mayinclude one or more nodes and all outgoing edges from the node(s).

Lookup of a set of outgoing edges associated with a source node(operation 406) from the node(s) in the partition may then be enabled.In particular, the partition containing the source node may beidentified (e.g., based on an identifier for the source node and anindex to the partition), and the outgoing edges may be searched by theidentifier. The outgoing edges may also be filtered by an attributeassociated with the outgoing edges. For example, outgoing edges with aname and/or other attribute that matches a prefix, value, and/or rangemay be provided. The lookup may also enable subsequent lookup of nodesand/or other directed edges associated with the source node. Forexample, the lookup may obtain one or more destination nodes associatedwith the outgoing edges and search a set of additional outgoing edgesassociated with the one or more destination nodes until nodes and/oroutgoing edges within a certain length from the source node have beensearched.

Finally, the graph-based data model is updated using a set oftransactions (operation 408). To update the graph-based data model,locking of a node and one or more outgoing edges associated with thenode may be enabled during a transaction associated with the node and anedge type of the one or more outgoing edges. Unlocking of the node andthe outgoing edge(s) may then be enabled after the transaction iscomplete. Moreover, rollback of the graph-based data model to a previousstate of the node and the outgoing edge(s) may be enabled to handletransaction failures and/or undoing of changes to the graph-based datamodel.

FIG. 5 shows a computer system 500 in accordance with the disclosedembodiments. Computer system 500 may correspond to an apparatus thatincludes a processor 502, memory 504, storage 506, and/or othercomponents found in electronic computing devices. Processor 502 maysupport parallel processing and/or multi-threaded operation with otherprocessors in computer system 500. Computer system 500 may also includeinput/output (I/O) devices such as a keyboard 508, a mouse 510, and adisplay 512.

Computer system 500 may include functionality to execute variouscomponents of the present embodiments. In particular, computer system500 may include an operating system (not shown) that coordinates the useof hardware and software resources on computer system 500, as well asone or more applications that perform specialized tasks for the user. Toperform tasks for the user, applications may obtain the use of hardwareresources on computer system 500 from the operating system, as well asinteract with the user through a hardware and/or software frameworkprovided by the operating system.

In one or more embodiments, computer system 500 provides a system formanaging access to data. The system may include a modeling apparatusthat provides a graph-based data model of the data, which includes a setof nodes and a set of directed edges among the nodes. The modelingapparatus may also store the graph-based data model in a set ofpartitions, such that each partition from the set of partitions includesone or more nodes from the set of nodes and all outgoing edges from theone or more nodes. The system may also include an interface with themodeling apparatus that enables lookup of a set of outgoing edgesassociated with a source node from the one or more nodes. Moreover, themodeling apparatus and/or interface may update the graph-based datamodel using a set of transactions.

In addition, one or more components of computer system 500 may beremotely located and connected to the other components over a network.Portions of the present embodiments (e.g., modeling apparatus,interface, etc.) may also be located on different nodes of a distributedsystem that implements the embodiments. For example, the presentembodiments may be implemented using a cloud computing system thatenables reliable concurrent access to and/or partitioning of data in agraph-based data model from a set of remote electronic devices.

The foregoing descriptions of various embodiments have been presentedonly for purposes of illustration and description. They are not intendedto be exhaustive or to limit the present invention to the formsdisclosed. Accordingly, many modifications and variations will beapparent to practitioners skilled in the art. Additionally, the abovedisclosure is not intended to limit the present invention.

1. A method of managing access to data, comprising: at one or morecomputer systems comprising processors, memory, and storage: storing aplurality of data items across a plurality of partitions; wherein thestoring comprises storing a graph-based data model that associates eachdata item of the plurality of data items with an identifier of a sourceentity pertaining to the data item, an identifier of a destinationentity pertaining to the data item, and an identifier of a type ofdirected relationship pertaining to the data item from the source entityto the destination entity; receiving a lookup request specifying anidentifier of a particular source entity and an identifier of aparticular type of directed relationship from the particular sourceentity; based on the identifier of the particular source entityspecified in the lookup request, identifying a particular partition ofthe plurality of partitions; and returning a response to the lookuprequest, the response comprising data items, each of the data itemsboth: (a) stored in the partition; and (b) associated in the partition,according to the graph-based data model, with both: (b1) the identifierof the particular source entity and (b2) the identifier of theparticular type of directed relationship.
 2. The method of claim 1,wherein the particular source entity is a user having a user accountwith an online content management system; and wherein each data item, ofthe data items returned in the response, identifies a differentcollection of content items, under management of the online contentmanagement system, to which the user having the user account haspermission to access.
 3. The method of claim 1, wherein the particularsource entity is a collection of content items under management of anonline content management system; and wherein each data item, of thedata items returned in the response, identifies a different user havinga user account, with the online content management system, that haspermission to access the collection of content items.
 4. The method ofclaim 1, wherein each data item, of the data items returned in theresponse, represents permissions that a particular user having a useraccount with an online content management system has with respect to adifferent collection of content items under management of the onlinecontent management system, the particular user identified by theidentifier of the particular source entity, the different collection ofcontent items identified by the each data item.
 5. The method of claim1, wherein each data item, of the data items returned in the response,represents permissions that a different user having a user account withan online content management system has with respect to a particularcollection of content items under management of the online contentmanagement system, the particular collection of content items identifiedby the identifier of the particular source entity, the different userhaving a user account identified by the each data item.
 6. The method ofclaim 1, wherein: the lookup request is a first lookup request; theresponse is a first response; the method further comprises: receiving asecond lookup request specifying the identifier of the particular sourceentity, an identifier of a particular destination entity, and theidentifier of the particular type of directed relationship; responsiveto receiving the second lookup request, identifying, based on theidentifier of the particular source entity specified in the secondlookup request, the particular partition of the plurality of partitions;and returning a second response to the second lookup request, the secondresponse comprising a particular data item that is both: (a) stored inthe particular partition; and (b) associated in the particularpartition, according to the graph-based data model, with all of: (b1)the identifier of the particular source entity, (b2) the identifier ofthe destination entity, and (b3) the identifier of the type of directedrelationship.
 7. The method of claim 1, wherein the particular sourceentity corresponds to a node in the graph-based data model and theparticular type of directed relationship corresponds to a directed edgefrom the node in the graph-based data model.
 8. The method of claim 1,wherein at least one data item of the data items returned in theresponse is obtained from a cache of data items.
 9. The method of claim1, further comprising: storing a plurality of slave partitionscorresponding to the plurality of partitions.
 10. An online contentmanagement system comprising: one or more processors; one or morecomputer-readable media storing one or more computers programs, the oneor more computer programs configured for: storing a plurality of dataitems across a plurality of partitions; receiving a first lookup requestspecifying an identifier of a particular source entity, an identifier ofa particular destination entity, and an identifier of a particular typeof directed relationship from the particular source entity to theparticular destination entity; based on the identifier of the particularsource entity specified in the first lookup request, identifying aparticular partition of the plurality of partitions; returning a firstresponse to the first lookup request, the first response comprising aparticular data item that is both: (a) stored in the particularpartition; and (b) associated, according to a graph-based data model,with all of: (b1) the identifier of the particular source entity, (b2)the identifier of the particular destination entity, and (b3) theidentifier of the particular type of directed relationship; receiving asecond lookup request specifying the identifier of the particular sourceentity and the identifier of the particular type of directedrelationship; based on the identifier of the particular source entityspecified in the second lookup request, identifying the partition of theplurality of partitions; and returning a second response to the secondlookup request, the second response comprising data items, each of thedata items both: (a) stored in the particular partition; and (b)associated, according to the graph-based data model, with at least both:(b1) the identifier of the particular source entity and (b2) theidentifier of the particular type of directed relationship.
 11. A systemfor managing access to data, the system comprising: one or moreprocessors; one of more computer-readable media storing one or more setsof instructions configured for: storing a plurality of data items acrossa plurality of partitions; wherein the storing comprises storing agraph-based data model that associates each data item of the pluralityof data items with an identifier of a source entity pertaining to thedata item, an identifier of a destination entity pertaining to the dataitem, and an identifier of a type of directed relationship pertaining tothe data item from the source entity to the destination entity;receiving a lookup request specifying an identifier of a particularsource entity and an identifier of a particular type of directedrelationship from the particular source entity; based on the identifierof the particular source entity specified in the lookup request,identifying a particular partition of the plurality of partitions; andreturning a response to the lookup request, the response comprising dataitems, each of the data items both: (a) stored in the particularpartition; and (b) associated in the particular partition, according tothe graph-based data model, with both: (b1) the identifier of theparticular source entity and (b2) the identifier of the particular typeof directed relationship.
 12. The system of claim 11, wherein theparticular source entity is a user having a user account with an onlinecontent management system; and wherein each data item, of the data itemsreturned in the response, identifies a different collection of contentitems, under management of the online content management system, towhich the user having the user account has permission to access.
 13. Thesystem of claim 11, wherein the particular source entity is a collectionof content items under management of an online content managementsystem; and wherein each data item, of the data items returned in theresponse, identifies a different user having a user account, with theonline content management system, that has permission to access thecollection of content items.
 14. The system of claim 11, wherein eachdata item, of the data items returned in the response, representspermissions that a particular user having a user account with an onlinecontent management system has with respect to a different collection ofcontent items under management of the online content management system,the particular user identified by the identifier of the particularsource entity, the different collection of content items identified bythe each data item.
 15. The system of claim 11, wherein each data item,of the data items returned in the response, represents permissions thata different user having a user account with an online content managementsystem has with respect to a particular collection of content itemsunder management of the online content management system, the particularcollection of content items identified by the identifier of theparticular source entity, the different user having a user accountidentified by the each data item.
 16. The system of claim 11, wherein:the lookup request is a first lookup request; the response is a firstresponse; the one or more sets of instructions are further configuredfor: receiving a second lookup request specifying the identifier of theparticular source entity, an identifier of a particular destinationentity, and the identifier of the particular type of directedrelationship; responsive to receiving the second lookup request,identifying, based on the identifier of the particular source entityspecified in the second lookup request, the particular partition of theplurality of partitions; and returning a second response to the secondlookup request, the second response comprising a particular data itemthat is both: (a) stored in the particular partition; and (b) associatedin the particular partition, according to the graph-based data model,with all of: (b1) the identifier of the particular source entity, (b2)the identifier of the destination entity, and (b3) the identifier of thetype of directed relationship.
 17. The system of claim 11, wherein theparticular source entity corresponds to a node in the graph-based datamodel and the particular type of directed relationship corresponds to adirected edge from the node in the graph-based data model.
 18. Thesystem of claim 11, wherein at least one data item of the data itemsreturned in the response is obtained from a cache of data items.
 19. Thesystem of claim 11, wherein the one or more sets of instructions arefurther configured for: storing a plurality of slave partitionscorresponding to the plurality of partitions.
 20. One or morenon-transitory computer-readable media storing one or more sets ofinstructions for execution by one or more processors, the one or moresets of instructions configured for: storing a plurality of data itemsacross a plurality of partitions; wherein the storing comprises storinga graph-based data model that associates each data item of the pluralityof data items with an identifier of a source entity pertaining to thedata item, an identifier of a destination entity pertaining to the dataitem, and an identifier of a type of directed relationship pertaining tothe data item from the source entity to the destination entity;receiving a lookup request specifying an identifier of a particularsource entity and an identifier of a particular type of directedrelationship from the particular source entity; based on the identifierof the particular source entity specified in the lookup request,identifying a particular partition of the plurality of partitions; andreturning a response to the lookup request, the response comprising dataitems, each of the data items both: (a) stored in the particularpartition; and (b) associated in the particular partition, according tothe graph-based data model, with both: (b1) the identifier of theparticular source entity and (b2) the identifier of the particular typeof directed relationship.